﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using MobileSales.Model.Exceptions;

namespace MobileSales.Server.Services
{
    [ServiceContract]
    public interface IAuthService
    {
        [OperationContract]
        string Login(string userName, string passwdSHA1);
        [OperationContract]
        string RenewToken(string token);
        [OperationContract]
        [FaultContract(typeof(ValidationException))]
        void ChangePassword(string token, string oldPasswdSHA1, string newPasswdSHA1);
        [OperationContract]
        [FaultContract(typeof(ValidationException))]
        void RemindPassword(string email);
        [OperationContract]
        int GetUserIdFromToken(string token);
        [OperationContract]
        bool TokenHasWebsiteAccess(string token);
    }
}
